from enum import Enum, unique
from typing import List

@unique
class DataTypeEnum(Enum):
    """
    数据类型枚举类
    所有基本数据类型，以及std数据结构、repeated和map。
    repeated表示数组，map表示键值对。
    """
    INT = "int"
    FLOAT = "float"
    DOUBLE = "double"
    CHAR = "char"
    STRING = "std::string"
    BOOL = "bool"
    REPEATED = "repeated"
    MAP = "map"
    INT32 = "int32"
    INT64 = "int64"
    UINT32 = "uint32"
    # UINT64 = "uint64"
    # SINT32 = "sint32"
    # SINT64 = "sint64"
    # FIXED32 = "fixed32"
    # FIXED64 = "fixed64"
    # SFIXED32 = "sfixed32"
    # SFIXED64 = "sfixed64"
    FLOAT32 = "float32"
    FLOAT64 = "float64"
    BYTES = "bytes"

    # 获取所有枚举值的列表
    @classmethod
    def get_all_values(cls) -> List[str]:
        return [item.value for item in cls]
